<script setup lang="ts">
import { provide, ref } from 'vue';
import ParentComp from './components/ParentComp.vue';

// 1. 提供数据
const money = ref(1000000000)
const payMoney = (value: number) => {
  console.log(value);
  money.value -= value
}
provide('money', money)
provide('payMoney', payMoney)

</script>

<template>
  <div class="app-page" style="border: 10px solid #ccc; padding: 50px; width: 600px">
    app 组件
    <ParentComp />
  </div>
</template>